<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>用户组管理</title>
    <#include '../include/common.html'/>
    <script type="text/javascript" src="<@s.url '/statics/js/jquery.formautofill.js'/>"></script>
    <script type="text/javascript" src="<@s.url '/resources/process/js/group.js'/>"></script>
    <script type="text/html" id="handle">
        <div class="layui-btn-group">
        <button class='layui-btn layui-btn-mini layui-btn-danger' onclick='removeUserWindow("{{d.id}}","{{d.name}}")' title='移除用户'><i class='layui-icon'>&#xe638;</i>移除用户</button>
        <button class='layui-btn layui-btn-mini' onclick='addUserWindow("{{d.id}}","{{d.name}}")' title='添加用户'><i class='layui-icon'>&#xe638;</i>添加用户</button>
        </div>
    </script>
</head>
<body>
<div class="layui-btn-group">
    <button class="layui-btn" onclick="showAddWindow(1)" title="添加"><i class="layui-icon">&#xe654;</i>添加</button>
    <button class="layui-btn layui-btn-warm" onclick="showAddWindow(2)" title="修改"><i class="layui-icon">&#xe654;</i>修改</button>
    <button class="layui-btn  layui-btn-danger" onclick="del()" title="删除"><i class="layui-icon">&#xe654;</i>删除</button>
    <button class="layui-btn layui-btn-normal" onclick="javascript:location.reload();" title="刷新"><i class="layui-icon">&#x1002;</i>刷新</button>
</div>
<br>
<table class="layui-table" lay-data="{height:'full-40',url:'group/list.json',page:true,id:'group-grid',request:{pageName:'pageNum',limitName:'pageSize'},response:{statusName:'status',statusCode:200,countName:'total',dataName:'list'},limit:9999}" lay-filter="group-grid">
    <thead>
    <tr>
        <th lay-data="{checkbox:true}"></th>
        <th lay-data="{field:'id',width:400}">ID</th>
        <th lay-data="{field:'name',width:200}">Name</th>
        <th lay-data="{field:'type',width:200}">Type</th>
        <th lay-data="{field:'revision',width:200}">Revision</th>

        <th lay-data="{field:'id',width:200,templet:'#handle'}">操作</th>
    </tr>
    </thead>
</table>

<!--弹出窗表单 start-->
<!--添加表单-->
<!--窗口表单-->
<form class="layui-form layui-form-pane window-form" id="addForm" action="add.do" style="display: none">
    <div class="layui-form-item">
        <label class="layui-form-label">代码</label>
        <div class="layui-input-block">
            <input type="text" name="id" required  lay-verify="required" placeholder="请输入用户组代码" class="layui-input"/>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" required  lay-verify="required" placeholder="请输入用户组名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分类</label>
        <div class="layui-input-block">
            <input type="text" name="type" required  lay-verify="required" placeholder="请输入用户组分类"class="layui-input">
        </div>
    </div>
        <input type="text" name="revision" value="0" class="hidden-input">

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="group-add-from">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

<table id="user-grid-table" style="display: none"></table>
<!--弹出窗表单 end-->
</body>
</html>